package com.kb.erp.mapper.sqlServer;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.kb.erp.domain.PersonGradeInfo;
import com.kb.erp.entity.HrEntity;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface HrMapper extends BaseMapper<HrEntity> {
    @Select("SELECT EmpNo,EmpName,dtName2,dtName3,dtName4,dtName5,dtName6,dtName7 FROM [dbo].[PerEmployee] WHERE EmpName = #{name}")
    List<HrEntity> queryDeptByName(String name);

    @Select("SELECT DISTINCT DutyNo,PerEmployee.DtName,LevelClass,PerDuty.ID as id FROM [dbo].[PerEmployee] LEFT JOIN PerDuty ON PerEmployee.DutyNo = PerDuty.DtID WHERE PerEmployee.EmpCurrentStateNo != '04'")
    List<PersonGradeInfo> personGradeInfo();
}
